﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GetTogether.Studio.Schedule;

public partial class Schedule_Callback_Projects : ProjectCallbackTemplate<ScheduleTask>
{
    protected override void OnPreInit(EventArgs e)
    {
        ProjectUserControl = "~/Schedule/Components/ProjectGroup.ascx";
        ProjectBasePath = ScheduleTask.GetSettingsPathPublic();

        if (IsGetNewProject)
        {
            EditProject = ScheduleTask.GetSettingsByProjectName(ProjectName);
        }
        else if (!string.IsNullOrEmpty(Content))
        {
            EditProject = new ScheduleTask();
            EditProject = GetTogether.Utility.SerializationHelper.FromXml<ScheduleTask>(Content);
            if (EditProject != null) ProjectName = EditProject.Name;
        }
        base.OnPreInit(e);
    }
}